/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bpr.webservice.domain;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 *
 * @author yogi
 */
@Entity
public class Menu {
    @Id
    @SequenceGenerator(name="menu_menuid",sequenceName="menuid_seq", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="menu_menuid")
    @Basic(optional = false)
    @Column(name = "menuid")
    private Long menuid;
    @Basic(optional = false)
    @Column(name = "menuname")
    private String menuname;
    @Basic(optional = false)
    @Column(name = "link")
    private String link;
    @Column(name = "caption")
    private String caption;
    @Column(name = "levels")
    private Integer levels;
    @Column(name = "parent")
    private Integer parent;
    @Column(name = "visible")
    private Boolean visible;
    @JsonIgnore
    @OneToMany(mappedBy = "menuid", fetch = FetchType.LAZY)
    private List<Menuaccess> menuaccessList;
	public Menu() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Long getMenuid() {
		return menuid;
	}
	public void setMenuid(Long menuid) {
		this.menuid = menuid;
	}
	public String getMenuname() {
		return menuname;
	}
	public void setMenuname(String menuname) {
		this.menuname = menuname;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	public String getCaption() {
		return caption;
	}
	public void setCaption(String caption) {
		this.caption = caption;
	}
	public Integer getLevels() {
		return levels;
	}
	public void setLevels(Integer levels) {
		this.levels = levels;
	}
	public Integer getParent() {
		return parent;
	}
	public void setParent(Integer parent) {
		this.parent = parent;
	}
	
	public Boolean getVisible() {
		return visible;
	}
	public void setVisible(Boolean visible) {
		this.visible = visible;
	}
	public List<Menuaccess> getMenuaccessList() {
		return menuaccessList;
	}
	public void setMenuaccessList(List<Menuaccess> menuaccessList) {
		this.menuaccessList = menuaccessList;
	}
	
}
